<% form_for(expense, :html => {:class => "panel"}) do |f| %>

  <fieldset>

  <div class="row"><label for="description">Description</label>
  <%= f.text_field :description %></div>

  <div class="row"><label for="amount">Amount</label>
  <%= f.text_field :amount %></div>

  <div class="row"><label for="location">Location</label>
  <%= f.text_field :location %></div>

  <div class="row"><label for="note">Note</label>
  <%= f.text_field :note %></div>

  <div class="row"><label for="expense_categories">Categories</label>
    <% @selected = @expense.categories.collect { |c| c.id.to_i } -%>
    <select id="expense_categories" name="expense[categories][]" multiple="multiple">
      <%= options_from_collection_for_select(@categories, "id", "name", @selected) %>
    </select>
  </div>

  </fieldset>

  <p>
    <%= link_to 'Save', "#", {:type => "submit", :class => "whiteButton"} %>
  </p>

<% end %>